Method and apparatus for communicating with plug and play devices

ABSTRACT

A method and apparatus for communicating with a plug and play device, for example, a network adapter comprising, searching a system registry for an identity corresponding with a plug and play device; obtaining a symbolic link list corresponding with the identity obtained from the registry; obtaining a pointer to a device object corresponding with a symbolic link in the symbolic link list; and using the device object to obtain information about the plug and play device. The information obtained may then be used to communicate with the plug and play device.

COPY RIGHT NOTICE

[0001] Contained herein is material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction of the patent disclosure by any person as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all rights to the copyright whatsoever.

BACKGROUND

[0002] 1. Field of the Invention

[0003] The present invention is related to the field of networking. In particular, the present invention is related to a method and apparatus for communicating with plug and play devices.

[0004] 2. Description of the Related Art

[0005] Device drivers typically scan all the Peripheral Component Interconnect (PCI) slots and buses when searching for a PCI plug and play network adapter in a plug and play operating system. Plug and play is an Intel standard for the design of personal computer expansion boards. Plug and play eliminates the frustration of configuring the system when adding new peripherals, and self configure interrupt requests, direct memory access settings, and memory addresses on startup.

[0006] Device drivers often use legacy operating system function calls such as, get adapter, get bus information, etc. in order to detect a PCI plug and play network adapter. Some versions of Microsoft's operating system do not support legacy operating system function calls for detecting and communicating with plug and play devices. Moreover, future versions too will not support legacy operating system function calls for detecting and communicating with plug and play devices.

[0007] Under Microsoft's operating system, a network device that fails to boot is declared invalid in the Windows registry, and the network adapter interface, i.e., the Network Driver Interface Specification (NDIS) driver for the particular network device does not load. The NDIS driver allows network drivers invoked by application programs to communicate with network devices, e.g. network adapters. However, since the NDIS driver does not load, the network adapters cannot be accessed by the application programs. Moreover, because legacy operating system function calls are not supported by Microsoft's plug and play operating system, kernel-mode network device drivers are also unable to access the network adapters. This makes diagnosis of problems associated with the network adapters virtually impossible.

BRIEF SUMMARY OF THE DRAWINGS

[0008] Examples of the present invention are illustrated in the accompanying drawings. The accompanying drawings, however, do not limit the scope of the present invention. Similar references in the drawings indicate similar elements.

[0009]FIG. 1 illustrates a block diagram of one embodiment of a network adapter communication unit.

[0010]FIG. 2 illustrates one embodiment of a flow diagram for communicating with a network adapter.

[0011]FIG. 3 illustrates one embodiment of an apparatus for communicating with a network adapter.

DETAILED DESCRIPTION

[0012] Described is a method and apparatus for communicating with a network adapter in a Microsoft® plug and play operating system. Although the technique disclosed herein is described as communicating with a network adapter, the technique may be used to communicate with other plug and play devices such as sound cards, video cards, input/output cards, etc. The method searches a system registry for an identity corresponding with a network adapter, obtains a symbolic link list corresponding with the identity from the system registry, obtains a pointer to a device object corresponding with a symbolic link in the symbolic link list, and uses the device object to obtain information about the network adapter.

[0013] The information obtained may then be used to query the network adapter to aid in, for example, fault finding and fault diagnosis. In the following description numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known architectures, steps, and techniques have not been shown to avoid obscuring the present invention.

[0014] The invention may utilize a distributed computing environment. In a distributed computing environment, program modules may be physically located in different local and remote memory storage devices. Execution of the program modules may occur locally in a stand-alone manner or remotely in a client/server manner. Examples of such distributed computing environments include local area networks of an office, enterprise-wide computer networks, and the global Internet.

[0015] In addition, it should be understood that the programs, processes, method, etc. described herein are not related or limited to any particular computer or apparatus nor are they related or limited to any particular communication network architecture. Rather, various types of general purpose machines, wired or wireless, may be used with program modules constructed in accordance with the teachings described herein. Similarly, it may prove advantageous to construct a specialized apparatus to perform the method steps described herein by way of dedicated computer systems in a specific network architecture with hard-wired logic or programs stored in a nonvolatile memory such as read only memory.

[0016]FIG. 1 illustrates one embodiment of a block diagram of a network adapter communication unit. The network adapter communication unit 100 includes an application program unit 105 that sends an index to a registry unit 110. The application program unit 105 can be an application program, and the index is a counter that increments each time the application program obtains the next physical device object (PDO). The application program unit 105 increments the index to obtain the next PDO, until the application program unit receives a “null” data structure from the PCI driver unit 115.

[0017] The registry unit 10 searches the Windows registry for an identity corresponding with a network adapter. The Windows registry is a database that includes configuration data about a computer, and includes hardware information, e.g., network adapter information. In particular, the registry unit 10 searches the Windows registry for a GUID_NDIS_LAN_CLASS GUID. A GUID is a Global Unique Identifier that uniquely identifies a plugin and it's capabilities. For a network adapter, a GUID uniquely identifies a network adapter's interface.

[0018] A network adapter's interface is an object that provides a defined set of input/output Request Packet (IRP) based services, and is instantiated in a particular device object. The Windows input/output (I/O) subsystem is a packet-driven system wherein each I/O operation is described by a single IRP. A device object that is created by a bus driver is referred to as a physical device object (PDO), and represents the underlying bus driver in the stack of plug and play drivers for a device.

[0019] Once the GUID_NDIS_LAN_CLASS GUID for the network adapter interface is obtained, the registry unit 110 obtains the symbolic link list associated with the GUID_NDIS_LAN_CLASS GUID from the Windows registry. The symbolic link list represents a list of PDOs corresponding to the plug and play network adapters. Next, the registry unit 110 obtains the symbolic link from the symbolic link list corresponding with the index received from the calling program. In particular, each symbolic link in the symbolic link list is enumerated, or iterated through, until the index value passed by the calling program is equaled. In one embodiment, the index sent by the calling program to the registry unit is incremented until a “null” data structure is passed by the PCI driver unit 115 to the application program unit 105. The symbolic link obtained from the Windows registry refers to a particular PDO associated with the network adapter interface. In particular, the symbolic link is used to query the operating system to obtain a pointer to the PDO associated with the network adapter interface.

[0020] In one embodiment, a bi-directional connection 125 exists between the application program unit 105 and the PCI driver unit 115. IRPs may be sent either by the application program unit 105 or by the PCI driver unit 115 to query the operating system's PCI driver. Using the symbolic link for the particular PDO as a pointer to the PDO, an IRP, for example, the IRP_MN_QUERY_BUS_INFORMATION may be sent by the PCI driver unit 115 to query the operating system's PCI driver in the Windows driver stack for the type and instance number of a network adapter's parent bus. In one embodiment, after obtaining the type and instance number of a network adapter's parent bus, an IRP may be sent to the operating system's PCI driver to ensure that communication is established with the PCI bus.

[0021] Using the pointer to the particular PDO, a portion, for example, the first 64 bytes of the PCI configuration header for the specific PCI network adapter may be read and stored in a data structure. Other IRPs, for example, the IRP_MN_QUERY_CAPABILITIES may be sent to determine the capabilities of the network adapter. An IRP_MN_QUERY_ID IRP may be sent to determine the unique device identity number assigned by the operating system to the network adapter. In one embodiment, the capabilities of the network adapter as well as the unique device identity number assigned by the operating system to the network adapter may be stored in a data structure. The data structure may be passed by the PCI driver unit 115 to the application program unit 105 using the bidirectional connection 125.

[0022] The application program unit 105 may use the data structure to communicate with the network adapter to aid in fault finding when the NDIS driver does not load, or when the operating system does not support legacy operating system function calls to the network device drivers. The network adapter communication unit 100, does not require PCI configuration information in the data structure to conform to either the Windows Win32 Driver Model (WDM) or to the NDIS driver specification. As a result, the data structure obtained can be used in both the WDM and NDIS drivers. Additionally, the network adapter detection unit 100 speeds up scanning for PCI network adapters as the network adapter detection unit 100 generates PCI configuration read cycles for the PDOs returned by the data structure, instead of PCI configuration read cycles for every PCI slot found by the PCI bus.

[0023] Various operations will be described as multiple discrete steps performed in turn in a manner that is helpful in understanding the present invention. However, the order of description should not be construed as to imply that these operations are necessarily performed in the order they are presented, or even order dependent. Lastly, repeated usage of the phrase “in one embodiment” does not necessarily refer to the same embodiment, although it may. FIG. 2 is one embodiment of a flow diagram that illustrates the process 200 by which an application program may communicate with a network adapter when the NDIS driver does not load, or when the operating system does not support legacy operating system function calls to the network device drivers. At 205 an application program sends an index to a subroutine or a function that queries the Windows registry. At 210, the subroutine or function searches the Windows registry for an identity corresponding with a network adapter. In particular, the application program queries the Windows registry for an GUID_NDIS_LAN_CLASS GUID. At 215, a determination is made weather the GUID being searched for has been found in the Windows registry.

[0024] If the GUID being searched for is found in the Windows registry, at 220, a symbolic link list corresponding with the GUID is obtained from the Windows registry. At 225, the symbolic link in the symbolic link list corresponding with the index from the calling program is obtained. Each symbolic link in the symbolic link list is enumerated or iterated through until the index value passed by the calling application program is equaled. At 230 a determination is made whether the end of the symbolic link list is reached. If the end of the symbolic link list is reached, at 235 a “null” data structure is passed to the calling application program.

[0025] If the end of the symbolic link list has not been reached, at 240 the symbolic link corresponding with the index is used to query the operating system to obtain a pointer to a PDO associated with the required network adapter. Once the pointer to the PDO corresponding with the required network adapter is obtained, at 245 one or more IRPs are sent to query the PCI driver of the operating system to obtain configuration and capability information about the network adapter. At 250, the network adapter configuration and capability information including a unique device identity number assigned by the operating system to the network adapter is obtained and stored in a data structure. The data structure may be used to communicate with the network adapter to diagnose faults when the NDIS driver does not load or when the operating system does not support legacy operating system function calls to the network device drivers.

[0026] The detailed description that follows is represented largely in terms of processes and symbolic representations of operations by conventional computer components, including a local processing unit, memory storage devices for the local processing unit, display devices, and input devices. As well understood by those skilled in the art, these operations often take the form of electrical, magnetic, or optical signals capable of being stored, transferred, combined, and otherwise manipulated through, for instance, electrical components. Furthermore, these processes and operations may utilize conventional computer components in a heterogeneous distributed computing environment, including remote file servers, computer servers, and memory storage devices. Each of these conventional distributed computing components is accessible to the local processing unit by a communication network.

[0027]FIG. 3 illustrates a typical computer system 300 in which the present invention operates. The computer system is used to execute an application program to search a system registry for an identity corresponding with a network adapter, to obtain a symbolic link list corresponding with the identity from the system registry, to obtain a pointer to a device object corresponding with a symbolic link in the symbolic link list, and to use the device object to obtain information about the network adapter. The information obtained may then be used to query the network adapter to aid in fault finding and fault diagnosis.

[0028] One embodiment of the present invention is implemented on a personal computer (PC) architecture. Alternative computer system architectures or other processor, programmable or electronic-based devices may also be employed. Computer system 300 includes a processor 302 coupled through a bus 301 to a random access memory (RAM) 303, a read only memory (ROM) 304, and a mass storage device 307. Mass storage device 307 represents a persistent data storage device, such as a floppy disk drive, fixed disk drive (e.g., magnetic, optical, magneto-optical, or the like), or streaming tape drive. Processor 302 may be any of a wide variety of general purpose processors or microprocessors (such as the Pentium® processor manufactured by Intel® Corporation), a special purpose processor, or a specifically programmed logic device.

[0029] Display device 305 is coupled to processor 302 through bus 301 and provides graphical output for computer system 300. Input devices 306 such as a keyboard or mouse are coupled to bus 301 for communicating information and command selections to processor 302. Also coupled to processor 302 through bus 301 is an input/output interface 310 which can be used to control and transfer data to electronic devices (printers, other computers, etc.) connected to computer system 300. Computer system 300 includes network devices 308 for connecting computer system 300 to one or more networks 314. Network devices 308, may include Ethernet devices including network adapters, phone jacks and satellite links. It will be apparent to one of ordinary skill in the art that other network devices may also be utilized.

[0030] One embodiment of the invention may be stored entirely as software on mass storage 307. Another embodiment of the invention may be embedded in hardware, for example, in a printed circuit board, in a special purpose processor, or in a specifically programmed logic device communicatively coupled to bus 301. Still other embodiments of the invention may be implemented partially as software and partially as hardware.

[0031] Embodiments of the invention may be represented as software stored on a machine-accessible medium (also referred to as a computer-accessible medium or a processor-accessible medium). The machine-accessible medium may be any type of magnetic, optical, or electrical storage medium including a diskette, CD-ROM, memory device (volatile or non-volatile), or similar storage mechanism. The machine-accessible medium may contain various sets of instructions, code sequences, configuration information, or other data. Other instructions and operations necessary to implement the described invention may also be stored on the machine-accessible medium.

[0032] Thus a method and apparatus have been disclosed for communicating with a network adapter in a Microsoft® operating system. While there has been illustrated and described what are presently considered to be example embodiments of the present invention, it will be understood by those skilled in the art that various other modifications may be made, and equivalents may be substituted, without departing from the true scope of the invention. Additionally, many modifications may be made to adapt a particular situation to the teachings of the present invention without departing from the central inventive concept described herein. Therefore, it is intended that the present invention not be limited to the particular embodiments disclosed, but that the invention include all embodiments falling within the scope of the appended claims.

[0033] William E. Alford, Reg. No. 37,764;Farzad E. Amini, Reg. No. 42,261; William Thomas Babbitt, Reg. No. 39,591; Carol F. Barry, Reg. No. 41,600; Jordan Michael Becker, Reg. No. 39,602; Lisa N. Benado, Reg. No. 39,995; Bradley J. Bereznak, Reg. No. 33,474; Michael A. Bemadicou, Reg. No. 35,934; Roger W. Blakely, Jr., Reg No. 25,831; R. Alan Burnett, Reg. No. 46,149; Gregory D. Caldwell, Reg. No. 39,926; Andrew C. Chen, Reg. No. 43,544; Thomas M. Coester, Reg. No. 39,637; Donna Jo Coningsby, Reg. No. 41,684; Florin Corie, Reg. No. 46,244; Dennis M. deGuzman, Reg. No. 41,702; Stephen M. De Klerk, Reg. No. P46,503; Michael Anthony DeSanctis, Reg. No. 39,957; Daniel M. De Vos, Reg. No. 37,813; Justin M. Dillon, Reg. No. 42,486; Sanjeet Dutta, Reg. No. P46,145; Matthew C. Fagan, Reg. No. 37,542, Tarek N. Fahmi, Reg. No. 41,402; George Fountain, Reg. No. 37,374; James Y. Go, Reg. No. 40,621; James A. Henry, Reg. No. 41,064; Willmore F. Holbrow III, Reg. No. PP41,845; Sheryl Sue Holloway, Reg. No. 37,850; George W Hoover II, Reg. No. 32,992; Eric S. Hyman, Reg. No. 30,139; William W. Kidd, Reg. No. 31,772; Sang Hui Kimn, Reg. No. 40,450; Walter T. Kim, Reg. No. 42,731; Eric T. King, Reg. No. 44,188; George B. Leavell, Reg. No. 45,436; Kurt P. Leyendecker, Reg. No. 42,799; Gordon R. Lindeen III, Reg. No. 33,192; Jan Carol Little, Reg. No. 41,181; Robert G. Litts, Reg. No. 46,876; Julio Loza, Reg. No. 47,758; Joseph Lutz, Reg. No. 43,765; Michael J. Mallie, Reg. No. 36,591; Andre L. Marais, under37 C.F.R. §10.9(b); Paul A. Mendonsa, Reg. No. 42,879; Clive D. Menezes, Reg. No. 45,493; Chun M. Ng, Reg. No. 36,878, Thien T. Nguyen, Reg. No. 43,835; Thinh V. Nguyen, Reg. No. 42,034; Dennis A. Nicholls, Reg. No. 42,036; Daniel E. Ovanezian, Reg. No. 41,236; Kenneth B. Paley, Reg. No. 38,989; Gregg A. Peacock, Reg. No. 45,001; Marina Portnova, Reg. No. P45,750; Michael A. Proksch, Reg. No. 43,021; William F. Ryann, Reg. 44,313; James H. Salter, Reg. No. 35,668; William W. Schaal, Reg. No. 39,018; James C. Scheller, Reg. No. 31,195; Jeffrey S. Schubert, Reg. No. 43,098; George Simion, Reg. No. P47,089; Maria McCormack Sobrino, Reg. No. 31,639; Stanley W. Sokoloff, Reg. No. 25,128; Edwin H. Taylor, Reg. No. 25,129, Lance A. Termes, Reg. No. 43,184; John F. Travis, Reg. No. 43,203; Joseph A. Twarowski, Reg. No. 42,191; Kerry D. Tweet, Reg. No. 45,959; Mark C. VanNess, Reg. No. 39,865; Thomas A. VanZandt, Reg. No. 43,219; Lester J. Vincent, Reg. No. 31,460; Glenn E. Von Tersch, Reg. No. 41,364, John Patrick Ward, Reg. No. 40,216; Mark L. Watson, Reg. No. P46,322; Thomas C. Webster,Reg. No. P46,154; and Norman Zafnan, Reg. No. 26,250; my patent attorneys, and Firasat Ali, Reg. No. 45,715; Richard Nakashima, Reg. No. 42,023, my patent agents of BLAKELY, SOKOLOFF, TAYLOR & ZAFMAN LLP, with offices located at 12400 Wilshire Boulevard, 7th Floor, Los Angeles, Calif. 90025, telephone (310) 207-3800, and Alan K. Aldous, Reg. No. 31,905; Robert D. Anderson, Reg. No. 33,826; Joseph R. Bond, Reg. No. 36,458; Richard C. Calderwood, Reg. No. 35,468; Jeffrey S. Draeger, Reg. No. 41,000; Cynthia Thomas Faatz, Reg No. 39,973; Sean Fitzgerald, Reg. No. 32,027; John N. Greaves, Reg. No. 40,362; John F. Kacvinsky, Reg No. 40,040; Seth Z. Kalson, Reg. No. 40,670; David J. Kaplan, Reg. No. 41,105; Charles A. Mirho, Reg. No. 41,199; Leo V. Novakoski, Reg. No. 37,198; Naomi Obinata, Reg. No. 39,320; Thomas C. Reynolds, Reg. No. 32,488; Kenneth M. Seddon, Reg. No. 43,105; Mark Seeley, Reg. No. 32,299; Steven P. Skabrat, Reg. No. 36,279; Howard A. Skaist, Reg. No. 36,008; Steven C. Stewart, Reg. No. 33,555; Raymond J. Wemer, Reg. No. 34,752, Robert G. Winkle, Reg. No. 37,474; Steven D. Yates, Reg. No. 42,242, and Charles K. Young, Reg. No. 39,435; my patent attorneys, Thomas Raleigh Lane, Reg. No. 42,781; Calvin E. Wells; Reg. No. P43,256, Peter Lam, Reg. No. 44,855, Michael J. Nesheiwat, Reg. No. P47,819; and Gene I. Su, Reg. No. 45,140; my patent agents, of INTEL CORPORATION; and James R. Thein, Reg. No. 31,710, my patent attorney; with full power of substitution and revocation, to prosecute this application and to transact all business in the Patent and Trademark Office connected herewith. 

What is claimed is:
 1. A method comprising: searching a system registry for an identity corresponding with a device; obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list; and using the device object to obtain information about the device.
 2. The method as in claim 1, wherein searching a system registry for an identity corresponding with a device comprises searching the system registry for a global unique identifier corresponding with a plug and play device.
 3. The method as in claim 2, wherein obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list comprises: obtaining a symbolic link list corresponding with the global unique identifier; obtaining a symbolic link in the symbolic link list corresponding with an index; and using the symbolic link to query an operating system for a pointer to the device object.
 4. The method as in claim 1, wherein using the device object to obtain information about the device comprises using a physical device object to obtain configuration information about the device.
 5. The method as in claim 2, wherein the plug and play device is a network adapter.
 6. An article of manufacture comprising: a machine-accessible medium including instructions that, when executed by a machine, causes the machine to perform operations comprising: searching a system registry for an identity corresponding with a device; obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list; and using the device object to obtain information about the device.
 7. An article of manufacture as in claim 6 wherein instructions for searching a system registry for an identity corresponding with a device comprises further instructions for searching the system registry for a global unique identifier corresponding with a plug and play device.
 8. An article of manufacture as in claim 7 wherein instructions for obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list comprises further instructions for obtaining a symbolic link list corresponding with the global unique identifier; obtaining a symbolic link in the symbolic link list corresponding with an index; and using the symbolic link to query an operating system for a pointer to the device object.
 9. An article of manufacture as in claim 6 wherein using the device object to obtain information about the device comprises using a physical device object to obtain configuration information about the device.
 10. An article of manufacture as in claim 7 wherein said instructions for searching a system registry for a global unique identifier corresponding with a plug and play device comprises instructions for searching a system registry for a global unique identifier corresponding with a plug and play network adapter.
 11. A computer system comprising: a bus; a data storage device coupled to said bus; and a processor coupled to said data storage device, said processor operable to receive instructions which, when executed by the processor, cause the processor to perform a method comprising searching a system registry for an identity corresponding with a device; obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list; and using the device object to obtain information about the device.
 12. A computer system as in claim 11 wherein searching a system registry for an identity corresponding with a device comprises searching the system registry for a global unique identifier corresponding with a plug and play device.
 13. A computer system as in claim 12 wherein obtaining a pointer to a device object corresponding with a symbolic link in the symbolic link list comprises: obtaining a symbolic link list corresponding with the global unique identifier; obtaining a symbolic link in the symbolic link list corresponding with an index; and using the symbolic link to query an operating system for a pointer to the device object.
 14. A computer system as in claim 11 wherein using the device object to obtain information about the device comprises using a physical device object to obtain configuration information about the device.
 15. A computer system as in claim 11 wherein the plug and play device is a network adapter.
 16. An apparatus comprising comprising: means for searching a system registry for an identity corresponding with a device; means for obtaining a pointer to a device object corresponding with a symbolic link in a symbolic link list; and means for using the device object to obtain information about the device.
 17. An apparatus as in claim 16, wherein the means for searching a system registry for an identity corresponding with a device comprises means for searching the system registry for a global unique identifier corresponding with a plug and play device.
 18. An apparatus as in claim 17, wherein the means for obtaining a pointer to a device object corresponding with a symbolic link in the symbolic link list comprises: means for obtaining a symbolic link list corresponding with the global unique identifier; means for obtaining a symbolic link in the symbolic link list corresponding with an index; and means for using the symbolic link to query an operating system for a pointer to the device object.
 19. An apparatus as in claim 16, wherein the means for using the device object to obtain information about the device comprises means for using a physical device object to obtain configuration information about the device.
 20. An apparatus as in claim 17, wherein the means for searching a system registry for an identity corresponding with a plug and play device comprises means for searching a system registry for an identity corresponding with a network adapter. 